<template>
    <div class="bread">
        <el-breadcrumb>
        <el-breadcrumb-item to="/index"> 首页</el-breadcrumb-item>
        <template  v-for="item in route.matched" :key="item.path">
            <el-breadcrumb-item  v-if="item.name!=='index'&&item.name!=='homepage'" :to="{ path: item.path }">{{item.meta.title}} </el-breadcrumb-item>
        </template>
    </el-breadcrumb>
    </div>
</template>
<script setup>
import { useRouter,useRoute } from 'vue-router';
const route=useRoute()
console.log(route.matched,'route.matched');
const router =useRouter()
</script>
<style scoped lanng="scss">
.bread {
    height: 25px;
    padding: 0px 10px;
    display: flex;
    align-items: center;
    background-color: #ffffff;
}
</style>